aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-11 07:04:23 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-11 07:04:23 +0000
commit473dae080a8a0089d5d619a56d8943d131aa451e (patch)
tree29763aae84d2c9336d9f34a5dc02c024285af60e /include/libbb.h
parentf1a7141cfcacf606ae321faa58c45617045460fe (diff)
downloadbusybox-w32-473dae080a8a0089d5d619a56d8943d131aa451e.tar.gz
busybox-w32-473dae080a8a0089d5d619a56d8943d131aa451e.tar.bz2
busybox-w32-473dae080a8a0089d5d619a56d8943d131aa451e.zip
add more convenient defines for [NO]MMU:
"#ifndef BB_NOMMU" is a double negative
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 04bf6a5cd..11fcd19f2 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -269,6 +269,8 @@ char *xrealloc_getcwd_or_warn(char *cwd);
269char *xmalloc_readlink_or_warn(const char *path); 269char *xmalloc_readlink_or_warn(const char *path);
270char *xmalloc_realpath(const char *path); 270char *xmalloc_realpath(const char *path);
271 271
272
273//TODO: signal(sid, f) is the same? then why?
272extern void sig_catch(int,void (*)(int)); 274extern void sig_catch(int,void (*)(int));
273//#define sig_ignore(s) (sig_catch((s), SIG_IGN)) 275//#define sig_ignore(s) (sig_catch((s), SIG_IGN))
274//#define sig_uncatch(s) (sig_catch((s), SIG_DFL)) 276//#define sig_uncatch(s) (sig_catch((s), SIG_DFL))
@@ -278,7 +280,6 @@ extern void sig_unblock(int);
278extern void sig_pause(void); 280extern void sig_pause(void);
279 281
280 282
281
282void xsetgid(gid_t gid); 283void xsetgid(gid_t gid);
283void xsetuid(uid_t uid); 284void xsetuid(uid_t uid);
284void xchdir(const char *path); 285void xchdir(const char *path);
@@ -519,15 +520,14 @@ pid_t xspawn(char **argv);
519 520
520/* Unlike waitpid, waits ONLY for one process, 521/* Unlike waitpid, waits ONLY for one process,
521 * It's safe to pass negative 'pids' from failed [v]fork - 522 * It's safe to pass negative 'pids' from failed [v]fork -
522 * wait4pid will return -1 and ECHILD in errno. 523 * wait4pid will return -1 (and will not clobber [v]fork's errno).
523 * IOW: rc = wait4pid(spawn(argv)); 524 * IOW: rc = wait4pid(spawn(argv));
524 * if (rc < 0) bb_perror_msg("%s", argv[0]); 525 * if (rc < 0) bb_perror_msg("%s", argv[0]);
525 * if (rc > 0) bb_error_msg("exit code: %d", rc); 526 * if (rc > 0) bb_error_msg("exit code: %d", rc);
526 */ 527 */
528int wait4pid(int pid);
527int wait_pid(int *wstat, int pid); 529int wait_pid(int *wstat, int pid);
528int wait_nohang(int *wstat); 530int wait_nohang(int *wstat);
529int wait4pid(int pid);
530//TODO: signal(sid, f) is the same? then why?
531#define wait_crashed(w) ((w) & 127) 531#define wait_crashed(w) ((w) & 127)
532#define wait_exitcode(w) ((w) >> 8) 532#define wait_exitcode(w) ((w) >> 8)
533#define wait_stopsig(w) ((w) >> 8) 533#define wait_stopsig(w) ((w) >> 8)
@@ -564,7 +564,7 @@ enum {
564 DAEMON_CLOSE_EXTRA_FDS = 4, 564 DAEMON_CLOSE_EXTRA_FDS = 4,
565 DAEMON_ONLY_SANITIZE = 8, /* internal use */ 565 DAEMON_ONLY_SANITIZE = 8, /* internal use */
566}; 566};
567#ifndef BB_NOMMU 567#if BB_MMU
568 void forkexit_or_rexec(void); 568 void forkexit_or_rexec(void);
569# define forkexit_or_rexec(argv) forkexit_or_rexec() 569# define forkexit_or_rexec(argv) forkexit_or_rexec()
570# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) 570# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags)