diff options
author | Ron Yorston <rmy@pobox.com> | 2021-08-17 08:26:36 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-08-17 08:26:36 +0100 |
commit | f13defb1c8f892ecf3e8dd5dbe486cc2b53e6f03 (patch) | |
tree | 15c9c174532e433e5632637c541d09e591c01d60 /util-linux/taskset.c | |
parent | 41f31584037be6b9d74a89245dff9ad8f0db146f (diff) | |
parent | 540aa116615713ad53e5ac98850993162e27c32d (diff) | |
download | busybox-w32-f13defb1c8f892ecf3e8dd5dbe486cc2b53e6f03.tar.gz busybox-w32-f13defb1c8f892ecf3e8dd5dbe486cc2b53e6f03.tar.bz2 busybox-w32-f13defb1c8f892ecf3e8dd5dbe486cc2b53e6f03.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'util-linux/taskset.c')
-rw-r--r-- | util-linux/taskset.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/taskset.c b/util-linux/taskset.c index afe2f04d2..d2ef9b98f 100644 --- a/util-linux/taskset.c +++ b/util-linux/taskset.c | |||
@@ -218,7 +218,7 @@ static int process_pid_str(const char *pid_str, unsigned opts, char *aff) | |||
218 | ul *mask; | 218 | ul *mask; |
219 | unsigned mask_size_in_bytes; | 219 | unsigned mask_size_in_bytes; |
220 | const char *current_new; | 220 | const char *current_new; |
221 | pid_t pid = xatoi_positive(pid_str); | 221 | pid_t pid = !pid_str ? 0 : xatou_range(pid_str, 1, INT_MAX); /* disallow "0": "taskset -p 0" should fail */ |
222 | 222 | ||
223 | mask_size_in_bytes = SZOF_UL; | 223 | mask_size_in_bytes = SZOF_UL; |
224 | current_new = "current"; | 224 | current_new = "current"; |
@@ -343,7 +343,7 @@ int taskset_main(int argc UNUSED_PARAM, char **argv) | |||
343 | /* <aff> <cmd...> */ | 343 | /* <aff> <cmd...> */ |
344 | if (!*argv) | 344 | if (!*argv) |
345 | bb_show_usage(); | 345 | bb_show_usage(); |
346 | process_pid_str("0", opts, aff); | 346 | process_pid_str(NULL, opts, aff); |
347 | BB_EXECVP_or_die(argv); | 347 | BB_EXECVP_or_die(argv); |
348 | } | 348 | } |
349 | 349 | ||