Re: Server writing: observations and questions

2001-01-05 Thread Roland McGrath
The GNU `error' function is good for this; see . It is takes a printf format, but also takes an argument that if non-zero is an exit code (if zero it does not exit) and an argument that if non-zero is an errno code to print after the formatted message (and a colon). So do: err = mach_msg (...

Re: Server writing: observations and questions

2001-01-05 Thread Neal H Walfield
On Wed, Jan 03, 2001 at 01:24:20AM -0500, Neal H Walfield wrote: > > > When implementing the client, the expected results can be obtained from > > > the server, however, if an invalid port, i.e. server, is used, perror > > > cannot decode errno: > > > > Ah, yes. Those are the MIG_* error codes,

Re: Server writing: observations and questions

2001-01-02 Thread Neal H Walfield
> > When implementing the client, the expected results can be obtained from > > the server, however, if an invalid port, i.e. server, is used, perror > > cannot decode errno: > > Ah, yes. Those are the MIG_* error codes, which aren't defined in the > normal way using mach/error.h's format. You

Re: Server writing: observations and questions

2000-10-17 Thread Roland McGrath
> A client gets a port with a send right to the server using > file_name_lookup, i.e.: > > file_t server; > server = file_name_lookup (argv[1], O_READ, 0666); > > Generally, these above flags/permissions work, however what is the > best combination and what do they mean in this conte