www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/18/21:22:32

From: Marc Singer <nbn.nbn.com!sapien!elf>
Subject: tmpnam function hangs in V2
To: nbn.nbn.com!sapien!sun.soe.clarkson.edu!djgpp (DJGPP List Alias)
Date: Fri, 18 Aug 1995 16:33:02 -0700 (PDT)

This program hangs in V2 after printing the first temporary file name.

#include "unistd.h"
#include "stdio.h"
#include "stdlib.h"

main ()
{
  char sz[100];

  tmpnam (sz);
  printf ("tmp %s\n", sz);
  tmpnam (sz);
  printf ("tmp %s\n", sz);
  tmpnam (sz);
  printf ("tmp %s\n", sz);
  
}  /* main */

The first temp name is OK, but I never return from the second one.  I
think that the code is valid because it works on Linux.

----------------------------------------------------------------------
          Marc Singer       | "... but when you eat this ... pear, you
       elf AT netcom DOT com       |  are rarely aware of the fact that it was
   or  elf AT sapien DOT com       |  ... plucked from the branch of this ... 
< My comments are my own. > |  pear tree." -- Charlie V.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019