home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16850 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.1 KB  |  35 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!sun-barr!ames!pacbell.com!iggy.GW.Vitalink.COM!nocsun.NOC.Vitalink.COM!wetware!ditka!eagercon!eagercon!eager
  3. From: eager@eagercon.com (Michael J. Eager)
  4. Subject: Re: Mail Call
  5. Message-ID: <1992Nov19.170927.13995@eagercon.com>
  6. Sender: root@eagercon.com (Operator)
  7. Reply-To: eager@eagercon.com
  8. Organization: Eager Consulting
  9. References: <1992Nov18.075408.722@ualr.edu>
  10. Date: Thu, 19 Nov 1992 17:09:27 GMT
  11. Lines: 22
  12.  
  13. In article 722@ualr.edu, lindstrom@acs.harding.edu () writes:
  14. >Greetings-
  15. >  Can someone tell me how to get a C program to make a system
  16. >call (SunOS Unix, using the bundled compiler).  I would like
  17. >to have a program send me a mail message every time it is
  18. >called (it is living on another, less secure machine.. I want to
  19. >keep track of its usage).
  20.  
  21.  
  22. Try putting the following in your code:
  23.  
  24.     system("mail myself@mymachine");
  25. or maybe
  26.     system("mail myself@mymachine < /etc/hostname.xx0");
  27.  
  28.  
  29.  
  30. ---
  31. Michael J. Eager        Michael.Eager@eagercon.com
  32. Eager Consulting        (415) 325-8077 
  33. 1960 Park Boulevard, Palo Alto, CA 94306-1141
  34.  
  35.