aboutsummaryrefslogtreecommitdiff
path: root/toys/other/setsid.c
AgeCommit message (Collapse)Author
2020-01-10setsid: document -w.Elliott Hughes
-w was added recently. The change in behavior so we now always fork means that it's needed in more cases too: other implementations of setsid(1) only fork if getpgrp() != getpid(). This broke a script, which is what made me notice the missing help. This seems to have been an accidental change, and is contrary to what the util-linux setsid(1) man page says: "The command calls fork(2) if already a process group leader. Otherwise, it executes a program in the current process", but whether we change our behavior or not, we should document the new option.
2019-12-26Fix setsid with vfork, redo command line arguments.Rob Landley
Switch -t to -c (like man page says), add -w (wait) and -d (detach from tty)
2015-09-29Make defconfig build for nommu.Rob Landley
Adds XVFORK() macro, teaches xpopen_both() to call /proc/self/exe with NULL argv (and converts cpio -p to use that), adds TOYBOX_FORK guards to some unconverted commands.
2015-09-23Add xvfork() as a static inline and use it from various places.Rob Landley
Note: vfork(), like fork(), can return -1 if too many processes, and we should notice and fail loudly.
2015-02-07Make toy_exec() check if argc is in optargs and deal with it there so we ↵Rob Landley
don't need a separate xexec_optargs().
2013-07-18Replace users of xexec(toys.optargs) with xexec_optargs(0) to avoid ↵Rob Landley
free/reuse bug during argument parsing.
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring.
2012-08-25Regularize command headers, update links to standards documents.Rob Landley
2012-08-25Move commands into "posix", "lsb", and "other" menus/directories.Rob Landley