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,672 of 243,242   
   Keith Thompson to highcrew   
   Re: srand(0)   
   31 Dec 25 16:05:19   
   
   From: Keith.S.Thompson+u@gmail.com   
      
   highcrew  writes:   
   > On 1/1/26 12:29 AM, Keith Thompson wrote:   
   >> Paul  writes:   
   >> That isn't quite correct, or is at least misleading.  ISO C guarantees   
   >> that argv[0] exists, but not that it points to a string.  On some   
   >> systems, it can contain be a null pointer.   
   >   
   > I heard of this before.   
   >   
   > Is it just theoretical, or do we have actual systems where   
   > argv[0]==NULL? I never saw it happen in any modern operating system.   
      
   Some systems (try to) guarantee that argv[0] points to a string, which   
   may or may not be the name of the program.  But there are ways, on some   
   systems, to invoke a program with argc==0 and argv[0]==NULL.   
      
   For details see here (I've recently made some updates).   
      
   https://github.com/Keith-S-Thompson/argv0   
      
   --   
   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