Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 547546 Details for
Bug 664066
sys-process/psmisc-23.2 breaks killall -SIG
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Cumulative updates to killall.c since 2.32 release.
psmisc-23.2-killall_options_updates.patch (text/plain), 3.14 KB, created by
Hank Leininger
on 2018-09-23 06:05:00 UTC
(
hide
)
Description:
Cumulative updates to killall.c since 2.32 release.
Filename:
MIME Type:
Creator:
Hank Leininger
Created:
2018-09-23 06:05:00 UTC
Size:
3.14 KB
patch
obsolete
>--- psmisc-23.2.orig/src/killall.c 2018-08-13 05:24:42.767618335 -0600 >+++ psmisc-23.2/src/killall.c 2018-09-22 23:40:45.653005698 -0600 >@@ -350,8 +350,8 @@ > lencomm = endcomm - startcomm; > if (lencomm < 0) > lencomm = 0; >- if (lencomm > sizeof comm -1) >- lencomm = sizeof comm -1; >+ if (lencomm > COMM_LEN -1) >+ lencomm = COMM_LEN -1; > strncpy(comm, startcomm, lencomm); > comm[lencomm] = '\0'; > >@@ -857,9 +857,9 @@ > > opterr = 0; > #ifdef WITH_SELINUX >- while ( (optc = getopt_long(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",options,NULL)) != -1) { >+ while ( (optc = getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",options,NULL)) != -1) { > #else >- while ( (optc = getopt_long(argc,argv,"egy:o:ilqrs:u:vwVIn:",options,NULL)) != -1) { >+ while ( (optc = getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwVIn:",options,NULL)) != -1) { > #endif > switch (optc) { > case 'e': >@@ -914,7 +914,7 @@ > ignore_case = 1; > } else { > sig_num = get_signal (argv[optind]+1, "killall"); >- skip_error=1; >+ skip_error=optind; > } > break; > case 'V': >@@ -922,13 +922,20 @@ > if (strcmp(argv[optind-1],"-V") == 0 || strncmp(argv[optind-1],"--",2) == 0) { > print_version(); > return 0; >+ } else { >+ sig_num = get_signal (argv[optind]+1, "killall"); >+ skip_error=optind; > } >- sig_num = get_signal (argv[optind]+1, "killall"); > break; >- case 'n': >- opt_ns_pid = atoi(optarg); >- if (opt_ns_pid == 0) >+ case 'n': { >+ long num; >+ char *end = NULL; >+ errno = 0; >+ num = strtol(optarg, &end, 10); >+ if (errno != 0 || optarg == end || end == NULL) > usage(_("Invalid namespace PID")); >+ opt_ns_pid = (pid_t) num; >+ } > break; > #ifdef WITH_SELINUX > case 'Z': >@@ -943,6 +950,15 @@ > break; > #endif /*WITH_SELINUX*/ > case '?': >+ if (skip_error == optind) >+ break; >+ /* Sigh, this is a hack because -ve could be -version or >+ * -verbose */ >+ if (strncmp(argv[optind-1], "-ve", 3) == 0) { >+ verbose=1; >+ exact=1; >+ break; >+ } > /* Signal names are in uppercase, so check to see if the argv > * is upper case */ > if (argv[optind-1][1] >= 'A' && argv[optind-1][1] <= 'Z') { >@@ -952,9 +968,6 @@ > if (argv[optind-1][1] >= '0' && argv[optind-1][1] <= '9') { > sig_num = atoi(argv[optind-1]+1); > } else { >- if (skip_error) >- skip_error=0; >- else > usage(NULL); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 664066
:
547286
| 547546