style fixes. No code changes.
This commit is contained in:
parent
163516da3a
commit
ff131b980d
@ -285,8 +285,6 @@ make_new_session(
|
||||
|
||||
/* make new process group */
|
||||
setsid();
|
||||
tcsetpgrp(0, getpid());
|
||||
/* ^^^ strace says: "ioctl(0, TIOCSPGRP, [pid]) = -1 ENOTTY" -- ??! */
|
||||
|
||||
/* open the child's side of the tty. */
|
||||
/* NB: setsid() disconnects from any previous ctty's. Therefore
|
||||
@ -296,6 +294,7 @@ make_new_session(
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
while (fd > 2) close(fd--);
|
||||
tcsetpgrp(0, getpid()); /* comment? */
|
||||
|
||||
/* The pseudo-terminal allocated to the client is configured to operate in
|
||||
* cooked mode, and with XTABS CRMOD enabled (see tty(4)). */
|
||||
|
@ -303,7 +303,8 @@ static void startservice(struct svdir *s)
|
||||
}
|
||||
run[1] = NULL;
|
||||
|
||||
if (s->pid != 0) stopservice(s); /* should never happen */
|
||||
if (s->pid != 0)
|
||||
stopservice(s); /* should never happen */
|
||||
while ((p = fork()) == -1) {
|
||||
warn_cannot("fork, sleeping");
|
||||
sleep(5);
|
||||
|
@ -110,7 +110,7 @@ int runcon_main(int argc, char **argv)
|
||||
if (!(opts & OPTS_CONTEXT_COMPONENT)) {
|
||||
context = *argv++;
|
||||
if (!argv[0])
|
||||
bb_error_msg_and_die("no command found");
|
||||
bb_error_msg_and_die("no command given");
|
||||
}
|
||||
|
||||
if (context) {
|
||||
@ -133,5 +133,4 @@ int runcon_main(int argc, char **argv)
|
||||
execvp(argv[0], argv);
|
||||
|
||||
bb_perror_msg_and_die("cannot execute '%s'", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user