aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/applets.h1
-rw-r--r--include/libbb.h21
-rw-r--r--include/usage.h5
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))
293USE_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 293USE_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
294USE_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER)) 294USE_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER))
295USE_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 295USE_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
296USE_TCPSVD(APPLET(tcpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
296USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 297USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
297USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 298USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
298USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 299USE_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);
266char *xmalloc_readlink_or_warn(const char *path); 266char *xmalloc_readlink_or_warn(const char *path);
267char *xmalloc_realpath(const char *path); 267char *xmalloc_realpath(const char *path);
268extern void xstat(const char *filename, struct stat *buf); 268extern 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 */
276extern int wait4pid(int pid); 277extern int wait4pid(int pid);
278extern int wait_pid(int *wstat, int pid);
279extern int wait_nohang(int *wstat);
280//TODO: signal(sid, f) is the same? then why?
281extern 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))
284extern void sig_block(int);
285extern void sig_unblock(int);
286/* UNUSED: extern void sig_blocknone(void);*/
287extern 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
277extern void xsetgid(gid_t gid); 296extern void xsetgid(gid_t gid);
278extern void xsetuid(uid_t uid); 297extern void xsetuid(uid_t uid);
279extern void xchdir(const char *path); 298extern 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. */
341void set_nport(len_and_sockaddr *lsa, unsigned port); 360void 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 */
343int get_nport(const len_and_sockaddr *lsa); 362int get_nport(const struct sockaddr *sa);
344/* Reverse DNS. Returns NULL on failure. */ 363/* Reverse DNS. Returns NULL on failure. */
345char* xmalloc_sockaddr2host(const struct sockaddr *sa, socklen_t salen); 364char* 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 \