home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19719 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.2 KB  |  36 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!munnari.oz.au!uniwa!cujo!cc.curtin.edu.au!tsuanian
  3. From: tsuanian@cc.curtin.edu.au
  4. Subject: Problem with execl()
  5. Message-ID: <1993Jan22.100233.1@cc.curtin.edu.au>
  6. Lines: 25
  7. Sender: news@cujo.curtin.edu.au (News Manager)
  8. Organization: Curtin University of Technology
  9. Date: Fri, 22 Jan 1993 01:02:33 GMT
  10.  
  11. This isn't a problem with C++ specifically, but it is
  12. hapenning with my BC++ 2.0 Compiler.
  13.  
  14. I am using the execl function to call another program
  15. after one completes. the line is something like
  16. execl("executor.exe","executor.exe",argv[3],NULL);
  17.  
  18. ideally this would mean that "executor.exe" would be passed
  19. 2 arguements i.e executor.exe and argv[3].  
  20. But when "executor.exe" starts up it has up to 5 arguments!
  21. The first two as expected, and the rest garbage. 
  22. (I discovered this by doing a printf on argc and argv).
  23.  
  24. Any ideas on why this happens.  I notice that this only happens if
  25. the program with the execl line in it (the calling program) is 
  26. large (i.e greater that 300K or so).
  27.  
  28. Any opinions?
  29.  
  30. Thanks
  31. Ian.
  32. -- 
  33.  Internet: TSUANIAN@cc.curtin.edu.au
  34.  Bitnet: TSUANIAN%cc.curtin.edu.au@cunyvm.bitnet
  35.  UUCP  : uunet!munnari.oz!cc.curtin.edu.au!TSUANIAN
  36.