diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/applets.h | 1 | ||||
-rw-r--r-- | include/libbb.h | 21 | ||||
-rw-r--r-- | include/usage.h | 5 |
3 files changed, 26 insertions, 1 deletions
diff --git a/include/applets.h b/include/applets.h index 77258be42..8073c15e1 100644 --- a/include/applets.h +++ b/include/applets.h | |||
@@ -293,6 +293,7 @@ USE_SYSLOGD(APPLET(syslogd, _BB_DIR_SBIN, _BB_SUID_NEVER)) | |||
293 | USE_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 293 | USE_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
294 | USE_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER)) | 294 | USE_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER)) |
295 | USE_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 295 | USE_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
296 | USE_TCPSVD(APPLET(tcpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | ||
296 | USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 297 | USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
297 | USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 298 | USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
298 | USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) | 299 | USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
diff --git a/include/libbb.h b/include/libbb.h index 7f0ad2c25..794049df9 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -266,6 +266,7 @@ char *xrealloc_getcwd_or_warn(char *cwd); | |||
266 | char *xmalloc_readlink_or_warn(const char *path); | 266 | char *xmalloc_readlink_or_warn(const char *path); |
267 | char *xmalloc_realpath(const char *path); | 267 | char *xmalloc_realpath(const char *path); |
268 | extern void xstat(const char *filename, struct stat *buf); | 268 | extern void xstat(const char *filename, struct stat *buf); |
269 | |||
269 | /* Unlike waitpid, waits ONLY for one process, | 270 | /* Unlike waitpid, waits ONLY for one process, |
270 | * It's safe to pass negative 'pids' from failed [v]fork - | 271 | * It's safe to pass negative 'pids' from failed [v]fork - |
271 | * wait4pid will return -1 and ECHILD in errno. | 272 | * wait4pid will return -1 and ECHILD in errno. |
@@ -274,6 +275,24 @@ extern void xstat(const char *filename, struct stat *buf); | |||
274 | * if (rc > 0) bb_error_msg("exit code: %d", rc); | 275 | * if (rc > 0) bb_error_msg("exit code: %d", rc); |
275 | */ | 276 | */ |
276 | extern int wait4pid(int pid); | 277 | extern int wait4pid(int pid); |
278 | extern int wait_pid(int *wstat, int pid); | ||
279 | extern int wait_nohang(int *wstat); | ||
280 | //TODO: signal(sid, f) is the same? then why? | ||
281 | extern void sig_catch(int,void (*)(int)); | ||
282 | //#define sig_ignore(s) (sig_catch((s), SIG_IGN)) | ||
283 | //#define sig_uncatch(s) (sig_catch((s), SIG_DFL)) | ||
284 | extern void sig_block(int); | ||
285 | extern void sig_unblock(int); | ||
286 | /* UNUSED: extern void sig_blocknone(void);*/ | ||
287 | extern void sig_pause(void); | ||
288 | |||
289 | #define wait_crashed(w) ((w) & 127) | ||
290 | #define wait_exitcode(w) ((w) >> 8) | ||
291 | #define wait_stopsig(w) ((w) >> 8) | ||
292 | #define wait_stopped(w) (((w) & 127) == 127) | ||
293 | |||
294 | |||
295 | |||
277 | extern void xsetgid(gid_t gid); | 296 | extern void xsetgid(gid_t gid); |
278 | extern void xsetuid(uid_t uid); | 297 | extern void xsetuid(uid_t uid); |
279 | extern void xchdir(const char *path); | 298 | extern void xchdir(const char *path); |
@@ -340,7 +359,7 @@ len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t | |||
340 | * NB: does NOT do htons() internally, just direct assignment. */ | 359 | * NB: does NOT do htons() internally, just direct assignment. */ |
341 | void set_nport(len_and_sockaddr *lsa, unsigned port); | 360 | void set_nport(len_and_sockaddr *lsa, unsigned port); |
342 | /* Retrieve sin[6]_port or return -1 for non-INET[6] lsa's */ | 361 | /* Retrieve sin[6]_port or return -1 for non-INET[6] lsa's */ |
343 | int get_nport(const len_and_sockaddr *lsa); | 362 | int get_nport(const struct sockaddr *sa); |
344 | /* Reverse DNS. Returns NULL on failure. */ | 363 | /* Reverse DNS. Returns NULL on failure. */ |
345 | char* xmalloc_sockaddr2host(const struct sockaddr *sa, socklen_t salen); | 364 | char* xmalloc_sockaddr2host(const struct sockaddr *sa, socklen_t salen); |
346 | /* This one doesn't append :PORTNUM */ | 365 | /* This one doesn't append :PORTNUM */ |
diff --git a/include/usage.h b/include/usage.h index a19bcf7c2..09b6908f9 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -3325,6 +3325,11 @@ USE_FEATURE_RUN_PARTS_FANCY("\n -l Prints names of all matching files even when | |||
3325 | "$ echo $?\n" \ | 3325 | "$ echo $?\n" \ |
3326 | "1\n" | 3326 | "1\n" |
3327 | 3327 | ||
3328 | #define tcpsvd_trivial_usage \ | ||
3329 | "TODO" | ||
3330 | #define tcpsvd_full_usage \ | ||
3331 | "TODO" | ||
3332 | |||
3328 | #define tftp_trivial_usage \ | 3333 | #define tftp_trivial_usage \ |
3329 | "[OPTION]... HOST [PORT]" | 3334 | "[OPTION]... HOST [PORT]" |
3330 | #define tftp_full_usage \ | 3335 | #define tftp_full_usage \ |