Index: initrd/admin-tclkit/kitcreator-modules/system/system.c ================================================================== --- initrd/admin-tclkit/kitcreator-modules/system/system.c +++ initrd/admin-tclkit/kitcreator-modules/system/system.c @@ -1953,11 +1953,11 @@ return(TCL_ERROR); } /* 3. Fork into a new process */ child = fork(); - if (child == ((pid_t) -1)) { + if (child == -1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("fork failed", -1)); return(TCL_ERROR); } @@ -1976,11 +1976,11 @@ select_ret = select(fd + 1, &read_fdset, NULL, NULL, &select_timeout); if (select_ret == 0) { /* On timeout, terminate starting process */ child_pgid = getpgid(child); - if (child_pgid != ((pid_t) -1)) { + if (child_pgid != -1) { kill(-child_pgid, SIGKILL); } Tcl_SetObjResult(interp, Tcl_NewStringObj("timeout", -1)); @@ -2000,11 +2000,11 @@ return(TCL_ERROR); } /* 4.parent.e. If the PGID given is actually an error, return error */ - if (child_pgid == ((pid_t) -1)) { + if (child_pgid == -1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("service failed to start", -1)); return(TCL_ERROR); } @@ -2018,11 +2018,11 @@ close(fds[0]); fd = fds[1]; /* 5. Create a new session */ setsid_ret = setsid(); - if (setsid_ret == ((pid_t) -1)) { + if (setsid_ret == -1) { write(fd, &child_pgid, sizeof(child_pgid)); _exit(0); } @@ -2078,20 +2078,20 @@ /* 6.g.ii. User */ /* XXX: TODO */ /* 7. Create a new process to actually spawn the process */ child = fork(); - if (child == ((pid_t) -1)) { + if (child == -1) { write(fd, &child_pgid, sizeof(child_pgid)); _exit(0); } if (child != 0) { /* 7.parent.a. Wait for child process to terminate and collect status */ waitpid_ret = waitpid(child, &status, 0); - if (waitpid_ret == ((pid_t) -1)) { + if (waitpid_ret == -1) { status = -1; } /* 7.parent.b. Set PGID (if successful, -1 otherwise) to pass back to TSMF */ if (status == 0) {