execvp.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | execvp.c (0936d4f3d5a3d5daf453bc341f02ba4e68cfe40e) |
---|---|
1/* Copyright (C) 2006 by Paolo Giarrusso - modified from glibc' execvp.c. 2 Original copyright notice follows: 3 4 Copyright (C) 1991,92,1995-99,2002,2004 Free Software Foundation, Inc. 5 This file is part of the GNU C Library. 6 7 The GNU C Library is free software; you can redistribute it and/or 8 modify it under the terms of the GNU Lesser General Public --- 122 unchanged lines hidden (view full) --- 131} 132#ifdef TEST 133int main(int argc, char**argv) 134{ 135 char buf[PATH_MAX]; 136 int ret; 137 argc--; 138 if (!argc) { | 1/* Copyright (C) 2006 by Paolo Giarrusso - modified from glibc' execvp.c. 2 Original copyright notice follows: 3 4 Copyright (C) 1991,92,1995-99,2002,2004 Free Software Foundation, Inc. 5 This file is part of the GNU C Library. 6 7 The GNU C Library is free software; you can redistribute it and/or 8 modify it under the terms of the GNU Lesser General Public --- 122 unchanged lines hidden (view full) --- 131} 132#ifdef TEST 133int main(int argc, char**argv) 134{ 135 char buf[PATH_MAX]; 136 int ret; 137 argc--; 138 if (!argc) { |
139 fprintf(stderr, "Not enough arguments\n"); | 139 os_warn("Not enough arguments\n"); |
140 return 1; 141 } 142 argv++; 143 if (ret = execvp_noalloc(buf, argv[0], argv)) { 144 errno = -ret; 145 perror("execvp_noalloc"); 146 } 147 return 0; 148} 149#endif | 140 return 1; 141 } 142 argv++; 143 if (ret = execvp_noalloc(buf, argv[0], argv)) { 144 errno = -ret; 145 perror("execvp_noalloc"); 146 } 147 return 0; 148} 149#endif |