The R Project SVN R

Rev

Rev 65709 | Rev 66104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 65709 Rev 65710
Line 315... Line 315...
315
    if (WIFEXITED(res)) res = WEXITSTATUS(res);
315
    if (WIFEXITED(res)) res = WEXITSTATUS(res);
316
#else
316
#else
317
    /* assume that this is shifted if a multiple of 256 */
317
    /* assume that this is shifted if a multiple of 256 */
318
    if ((res % 256) == 0) res = res/256;
318
    if ((res % 256) == 0) res = res/256;
319
#endif
319
#endif
-
 
320
    if (res == -1) {
-
 
321
	/* this means that system() failed badly - it didn't
-
 
322
	   even get to try to run the shell */
-
 
323
	warning(_("system call failed: %s"), strerror(errno));
-
 
324
	/* R system() is documented to return 127 on failure, and a lot of
-
 
325
	   code relies on that - it will misinterpret -1 as success */
-
 
326
	res = 127;
-
 
327
    }
320
    return res;
328
    return res;
321
}
329
}
322
 
330
 
323
#if defined(__APPLE__)
331
#if defined(__APPLE__)
324
# include <crt_externs.h>
332
# include <crt_externs.h>