runsv: run ./finish with parameters (runit compat)
[oweals/busybox.git] / shell / cttyhack.c
index 915ab5142fe9c4733916b7b57c0428d76204b304..572a3af035cb6e18db92dbe82c3fa3e5cad6c38f 100644 (file)
@@ -37,8 +37,8 @@ struct serial_struct {
        int     reserved[1];
 };
 
-int cttyhack_main(int argc, char **argv) ATTRIBUTE_NORETURN;
-int cttyhack_main(int argc, char **argv)
+int cttyhack_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int cttyhack_main(int argc UNUSED_PARAM, char **argv)
 {
        int fd;
        char console[sizeof(int)*3 + 16];
@@ -69,9 +69,9 @@ int cttyhack_main(int argc, char **argv)
                dup2(fd, 2);
                while (fd > 2) close(fd--);
                /* Some other session may have it as ctty. Steal it from them */
-               ioctl(0, TIOCSCTTY, 1)
+               ioctl(0, TIOCSCTTY, 1);
        }
 
        BB_EXECVP(argv[0], argv);
-       bb_perror_msg_and_die("cannot exec '%s'", argv[0]);
+       bb_perror_msg_and_die("can't execute '%s'", argv[0]);
 }