Changeset 7917 for trunk/Ohana/src/opihi/pantasks/client_shell.c
- Timestamp:
- Jul 16, 2006, 10:58:49 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pantasks/client_shell.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pantasks/client_shell.c
r7892 r7917 19 19 /* connect to the server */ 20 20 if (VarConfig ("PANTASKS_SERVER", "%s", hostname) == NULL) { 21 fprintf (stderr, "pantasks server host undefined\n");21 gprint (GP_ERR, "pantasks server host undefined\n"); 22 22 exit (2); 23 23 } … … 38 38 ppid = getppid(); 39 39 if (ppid == 1) { 40 fprintf (stderr, "caught parent shutdown\n");40 gprint (GP_ERR, "caught parent shutdown\n"); 41 41 exit (2); 42 42 } 43 43 if (!isatty (STDIN_FILENO)) exit (2); 44 fprintf (stdout, "Use \"quit\" to exit\n");44 gprint (GP_ERR, "Use \"quit\" to exit\n"); 45 45 Nbad ++; 46 46 continue; … … 57 57 status = command (line, &outline); 58 58 if (outline == NULL) { 59 fprintf (stderr, "programming error: command_client returned NULL\n");59 gprint (GP_ERR, "programming error: command_client returned NULL\n"); 60 60 exit (2); 61 61 } … … 63 63 /* command was not caught by client, send to server */ 64 64 if (*outline && !status ) { 65 fprintf (stderr, "sending message to %d: %s\n", server, outline);65 gprint (GP_ERR, "sending message to %d: %s\n", server, outline); 66 66 SendMessage (server, outline); 67 67 add_history (outline); … … 69 69 70 70 // XXX add this in and print to stdout 71 // status = ExpectMessage (server, 2.0, &message); 71 status = ExpectMessage (server, 2.0, &message); 72 gprint (GP_ERR, "got message: %d bytes\n", message.Nbuffer); 73 gwrite (message.buffer, 1, message.Nbuffer, GP_ERR); 74 gprint (GP_ERR, "end message\n"); 72 75 } 73 76 free (outline);
Note:
See TracChangeset
for help on using the changeset viewer.
