ARGSUSED*/
(clientData, interp, argc, argv)
| 889 | |
| 890 | /* |
| 891 | * tcpMainLoopCommand: |
| 892 | * |
| 893 | * This procedure is invoked in a non-Tk environment when the server |
| 894 | * implementor wishes to use a main loop built into the library. It |
| 895 | * repeatedly polls ofr work to be done, returning only when the last server |
| 896 | * is closed. |
| 897 | * |
| 898 | * In a Tk environment, the procedure returns immediately. |
| 899 | */ |
| 900 | |
| 901 | /*ARGSUSED*/ |
| 902 | static int |
| 903 | tcpMainLoopCommand (clientData, interp, argc, argv) |
| 904 | ClientData clientData; |
| 905 | Tcl_Interp * interp; |
| 906 | int argc; |
| 907 | char * * argv; |
| 908 | { |
| 909 | |
| 910 | int status; |
| 911 | |
| 912 | if (argc != 1) { |
| 913 | Tcl_AppendResult (interp, "wrong # args: should be \"", argv [-1], |
| 914 | " ", argv [0], "\"", (char *) NULL); |
| 915 | return TCL_ERROR; |
| 916 | } |
| 917 | |
| 918 | errno = 0; status = -1; |
| 919 | |
| 920 | /* In a non-Tk environment, errno has a Unix error or 0 for no clients |
| 921 | * or servers. In a Tk environment, errno is zero at this point. |
| 922 | */ |
| 923 |
no test coverage detected