home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / IDLE1.ZIP / IDLE.C next >
C/C++ Source or Header  |  1988-05-16  |  882b  |  30 lines

  1. /* Copyright 1988 Thomas R. Prodehl, Lattice, Inc.
  2. Permission is granted for private non-commercial use only. */
  3.  
  4. /* This program starts an Idle class command line interpreter.  Useful for 
  5. when you don't want to slow down detached compiles, for example.
  6. Any program started under this shell will also have a default priority of
  7. Idle. */
  8.  
  9. /* This program was compiled with the Lattice C Compiler 3.3. */
  10.  
  11. #include <doscalls.h>
  12. #include <stdlib.h>
  13. #include <os2.h>
  14.  
  15. unsigned long retcode;
  16. unsigned ret;
  17. char objname[64];
  18.  
  19. void main()
  20. {
  21.     ret = DOSSETPRTY(0, IDLE, 16, 0);
  22.     ret = DOSEXECPGM((char far *)objname, 64, ASYNCH_NOSAVE,
  23.             (char far *)0L, (char far *)0L,
  24.             (unsigned long far *)&retcode,
  25.             (char far *)"c:\\cmd.exe");
  26.     if (ret) printf("exec program error %d\n", ret);
  27.     DOSEXIT(1,0);
  28. /* this program exits but the spawned shell continues. */
  29. }
  30.