ps: document SCHED_BATCH and add "see also" for stime
ps: man page less ambiguous
+top: normal exit code should be 0 #341272
procps-3.2.6 --> procps-3.2.7
* Normal end of execution.
* catches:
* SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT and SIGTERM */
-static void end_pgm (int dont_care_sig) NORETURN;
-static void end_pgm (int dont_care_sig)
+static void end_pgm (int sig) NORETURN;
+static void end_pgm (int sig)
{
- (void)dont_care_sig;
- bye_bye(stdout, 1, NULL);
+ if(sig)
+ sig |= 0x80; // for a proper process exit code
+ bye_bye(stdout, sig, NULL);
}
while ((lin_end = strchr(glob, '\n'))) {
/* create a local copy we can extend and otherwise abuse */
- memcpy(lin, glob, (unsigned)(lin_end - glob));
+ memcpy(lin, glob, (unsigned)(lin_end - glob)); FIXME -- buffer overflow
/* zero terminate this part and prepare to parse substrings */
lin[lin_end - glob] = '\0';
room = Screen_cols;