Hi Martin,
Thanks for the cope-snippet. A small C program based on that revealed that it is a problem with popen (gzip is installed and working properly, and exchanging gzip with other programs produced the same error).
Error code 38 (ENOSYS) means "Function not implemented". So the problem appears to be popen not working properly on our system. We will now update the system.
Thanks for the info!
Cheers Lauge
On Thu, Sep 22, 2011 at 19:07, Martin Reuter mreuter@nmr.mgh.harvard.edu wrote:
Hi Lauge,
is gzip installed/working?
this is the code around that block (so you are right, it happens when popen tries to call gzip). I could not find out what error 38 means.
Best, Martin
char command[STRLEN]; // write gzipped file myclose=pclose; strcpy(command, "gzip -f -c > " ); if (strlen(command) + strlen(fname) >= STRLEN-1) ErrorReturn (ERROR_BADPARM, (ERROR_BADPARM, "%s:GCAMwrite(%s): gzip command line too long (%d)", \ Progname,fname, STRLEN)); strcat(command, fname); errno=0; printf("GCAMwrite:: the command is: %s\n",command); fp = popen(command, "w"); if (errno) { printf("GCAMwrite:: the popen error code is: %d\n",errno); if (fp) pclose(fp); errno = 0; ErrorReturn (ERROR_BADPARM, (ERROR_BADPARM, "GCAMwrite(%s): gzip encountered error.", fname)) ; }
freesurfer@nmr.mgh.harvard.edu