aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-02-04 00:34:31 -0600
committerRob Landley <rob@landley.net>2017-02-04 00:34:31 -0600
commit938901d7e2738be29b83331fb60a670afc20c602 (patch)
tree7787456d7ea14cc91c39bc2e039ccfbcafbb1138 /toys
parentcc24b6033a9cdc326006a537bd26c482ec7d7354 (diff)
downloadtoybox-938901d7e2738be29b83331fb60a670afc20c602.tar.gz
Switch oneit to use xopen_stdio() for -c (oops) and switch XVFORK() to use
__attribute__((returns_twice)) instead of noinline. Yes LLVM supports it: https://llvm.org/bugs/show_bug.cgi?id=6287
Diffstat (limited to 'toys')
-rw-r--r--toys/other/oneit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/oneit.c b/toys/other/oneit.c
index 9be67c05..68b5bd8c 100644
--- a/toys/other/oneit.c
+++ b/toys/other/oneit.c
@@ -79,7 +79,7 @@ void oneit_main(void)
while (!toys.signal) {
// Create a new child process.
- pid = vfork();
+ pid = XVFORK();
if (pid) {
// pid 1 reaps zombies until it gets its child, then halts system.
@@ -96,7 +96,7 @@ void oneit_main(void)
for (i=0; i<3; i++) {
close(i);
// Remember, O_CLOEXEC is backwards for xopen()
- xopen(TT.console ? TT.console : "/dev/tty0", O_RDWR|O_CLOEXEC);
+ xopen_stdio(TT.console ? TT.console : "/dev/tty0", O_RDWR|O_CLOEXEC);
}
// Can't xexec() here, we vforked so we don't want to error_exit().