Sous Solaris, on peut modifier le comportement en cas d'erreur:
/*-4- Changement des options du stream : erreur non persitente */
if ( ioctl(tty_fd, I_SERROPT, WERRNONPERSIST) == -1)
avec dans stropts.h:
/*
* Error options to adjust the stream head error behavior with respect
* to M_ERROR message for read and write side errors respectively.
* The normal case is that the read/write side error is
* persistent and these options allow the application or streams module/driver
* to specify that errors are nonpersistent. In this case the error is cleared
* after having been returned to read(), getmsg(), ioctl(), write(), putmsg(),
* etc.
*/
#define RERRNORM 0x001 /* Normal, persistent read errors */
#define RERRNONPERSIST 0x002 /* Nonpersistent read errors */
#define RERRMASK (RERRNORM|RERRNONPERSIST)
#define WERRNORM 0x004 /* Normal, persistent write errors */
#define WERRNONPERSIST 0x008 /* Nonpersistent write errors */
#define WERRMASK (WERRNORM|WERRNONPERSIST)
...
#define I_SERROPT (STR|043)
#define I_GERROPT (STR|044)
Y-a-t-il une possibilit� similaire sous Linux?
--
The falsely dramatic drives out the truly dull.