X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=bin%2Fsetrlimit.c;h=9097dacd54b8567f55826a56c42b8a59ea9a92a2;hp=0efa41ae58061882a1056e075005ee9eef6c6519;hb=51263462a77dba19f5913881429b92833072286f;hpb=bf2285740fc9db9c8ec86320fa8c6d755a95cf77;ds=sidebyside diff --git a/bin/setrlimit.c b/bin/setrlimit.c index 0efa41a..9097dac 100644 --- a/bin/setrlimit.c +++ b/bin/setrlimit.c @@ -1,5 +1,3 @@ -/* $Id: setrlimit.c,v 1.3 2007-08-14 10:17:11 mike Exp $ */ - /* * A simple wrapper program for the setrlimit(2) system call, which * can be used to run a subprocess under a different regime -- much @@ -99,13 +97,13 @@ int main(int argc, char **argv) { new.rlim_max = n; if (verbose) { if (new.rlim_cur != old.rlim_cur) - printf("%s: changing soft %s from %ld to %ld\n", - argv[0], types[i].name, - (long) old.rlim_cur, (long) new.rlim_cur); + fprintf(stderr, "%s: changing soft %s from %ld to %ld\n", + argv[0], types[i].name, + (long) old.rlim_cur, (long) new.rlim_cur); if (new.rlim_max != old.rlim_max) - printf("%s: changing hard %s from %ld to %ld\n", - argv[0], types[i].name, - (long) old.rlim_max, (long) new.rlim_max); + fprintf(stderr, "%s: changing hard %s from %ld to %ld\n", + argv[0], types[i].name, + (long) old.rlim_max, (long) new.rlim_max); } if (setrlimit(types[i].value, &new) < 0) { fprintf(stderr, "%s: setrlimit(%s=%ld): %s\n", @@ -130,8 +128,8 @@ int main(int argc, char **argv) { } if (verbose) - printf("%s: user='%s', optind=%d, new argc=%d, argv[0]='%s'\n", - argv[0], user, optind, argc-optind, argv[optind]); + fprintf(stderr, "%s: user='%s', optind=%d, new argc=%d, argv[0]='%s'\n", + argv[0], user, optind, argc-optind, argv[optind]); execvp(argv[optind], argv+optind); fprintf(stderr, "%s: execvp('%s'): %s\n",