home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,660 of 243,242   
   Keith Thompson to Michael S   
   Re: srand(0)   
   31 Dec 25 15:00:24   
   
   From: Keith.S.Thompson+u@gmail.com   
      
   Michael S  writes:   
   > On Tue, 30 Dec 2025 19:35:12 -0800   
   > Keith Thompson  wrote:   
   [...]   
   >> For more information, see   
   >> .   
   >   
   > If you are interested in behavior on non-POSIX systems, primarily   
   > Windows, but possibly others as well (e.g. VMS) then using exec() in   
   > caller sounds like a bad idea. It just not how these systems work and   
   > not how people write programs on them.   
   > Even when exec() *appears* to works in some environments (like   
   > msys2) it likely emulated by spawn() followed by exit().   
   >   
   > I'd implement caller with spawn(). I suppose that even on POSIX it is   
   > more idiomatic.   
      
   If I were going to look into the behavior on Windows, I'd probably   
   want to use Windows native features.  (I tried my test on Cygwin,   
   and the callee wasn't invoked.)   
      
   Apparently the Windows way to invoke a program is CreateProcessA().   
   But it takes the command line as a single string.  There might not   
   be a Windows-native way to exercise the kind of control over argc   
   and argv provided by POSIX execve().   
      
   --   
   Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com   
   void Void(void) { Void(); } /* The recursive call of the void */   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca