This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Beta 18 bash will complain if /tmp is missing


I was asked:

> I noticed that this list doens't include the most popular FAQ problem.  Have
> you done anything about bash and it's need for /tmp for this build?  
> 
> If not, I'll send in a simplistic patch (just have bash.exe check for /tmp
> on startup, and complain if it doesn't exist).

Yeah, this should be done.  I just added the following at the beginning of
main() in bash/shell.c which seems to do the trick:

#ifdef __CYGWIN32__
  /* verify that /tmp exists, complain if it doesn't */
  {
    struct stat statbuf;
    if (stat ("/tmp", &statbuf) < 0)
      {
        printf("WARNING: bash couldn't find /tmp, please create one!\n");
      } 
    else /* stat succeeded */
      {
        if (!S_ISDIR (statbuf.st_mode))
          printf("WARNING: bash needs /tmp to be a valid directory!\n");
      }
  }
#endif __CYGWIN32__

-- 
Geoffrey Noer
noer@cygnus.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]