Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152536480
D2616.id5543.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
912 B
Referenced Files
None
Subscribers
None
D2616.id5543.diff
View Options
Index: usr.bin/xargs/xargs.1
===================================================================
--- usr.bin/xargs/xargs.1
+++ usr.bin/xargs/xargs.1
@@ -206,7 +206,11 @@
.Ar maxprocs
invocations of
.Ar utility
-at once.
+at once. If
+.Ar maxprocs
+is negative or 0,
+.Nm
+will run as many processes as possible at a time.
.It Fl p
Echo each command to be executed and ask the user whether it should be
executed.
Index: usr.bin/xargs/xargs.c
===================================================================
--- usr.bin/xargs/xargs.c
+++ usr.bin/xargs/xargs.c
@@ -159,8 +159,11 @@
oflag = 1;
break;
case 'P':
- if ((maxprocs = atoi(optarg)) <= 0)
- errx(1, "max. processes must be >0");
+ maxprocs = strtol(optarg, &endptr, 10);
+ if (*endptr != '\0')
+ errx(1, "max. processes must be a number");
+ if (maxprocs < 1)
+ maxprocs = nargs;
break;
case 'p':
pflag = 1;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 1:27 PM (15 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31606521
Default Alt Text
D2616.id5543.diff (912 B)
Attached To
Mode
D2616: Make xargs -P0 create as many processes as possible
Attached
Detach File
Event Timeline
Log In to Comment