home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff294.lzh / DNet / amiga / lib / dexec.c < prev    next >
C/C++ Source or Header  |  1989-12-11  |  577b  |  30 lines

  1.  
  2. /*
  3.  *  DExec.C
  4.  *
  5.  *  Request the DNet driver to execute a command.  Due to problems with
  6.  *  the Lattice fork*() calls we cannot Execute() from the server process.
  7.  */
  8.  
  9. #include "lib.h"
  10.  
  11. int
  12. DExec(_chan, command)
  13. void *_chan;
  14. char *command;
  15. {
  16.     IOSTD ior;
  17.     CHANN *chan = (CHANN *)_chan;
  18.     PORT *replyport = CreatePort(NULL, 0);
  19.  
  20.     ior.io_Command = DNCMD_EXEC;
  21.     ior.io_Unit = 0;
  22.     ior.io_Offset = (long)command;
  23.     ior.io_Message.mn_ReplyPort = replyport;
  24.     PutMsg(chan->dnetport, (MSG *)&ior);
  25.     WaitMsg(&ior);
  26.     DeletePort(replyport);
  27.     return(1);
  28. }
  29.  
  30.