On Tue, Apr 21, 2020 at 10:48:46PM -0300, Gustavo Rios wrote:
> Dear gentleman,
> 
> i have the an ANSI C code that do the following:
> 
> 0. open a socket
> 1. write data to the socket
> 2. close the writing end of the socket
> 3. read data from the socket
> 4. close the read end of the socket
> 
> The the step number 4 returns an error, why ?
> 
> Here it is (Only the relevant part of the code )
> 
> if (!r) r = apx_connect(s, &sa);
> if (!r) r = pmp_set(&ap, 1ul, &bp);
> if (!r) r = pmpsend(s, &ap);
> if (!r) r = apx_shutdown(s, shut_wr);
> if (!r) r = pmprecv(&ap, s, &l);
> if (!r) r = apx_shutdown(s, shut_rd);
> 

This is not helpful. What kind of errno is returned? What kind of socket
used? There are many more questions...
The best way to report this  is to use ktrace and show its output.
>From that we can see what the syscalls are issued and if there is indeed
an error on shutdown().

-- 
:wq Claudio

Reply via email to