Home > OS >  Linux file descriptor conflict, the data string
Linux file descriptor conflict, the data string

Time:10-02

A serial port equipment, open file descriptors for 7
One is a TCP client, socket for 7
Results:
Was the client data, the results from the serial port to read out, but sometimes can also be read from the TCP client,
Very strange, have a great god met?

CodePudding user response:

Normal should be impossible, speculation is likely to be a serial port device driver in the process of registration kernel problems, check what is configured with less, and the kernel is not unified,

CodePudding user response:

Think of to, another may be different process space of file descriptor is the same, but the file descriptor can only be used in the current process space,

CodePudding user response:

refer to the second floor zhgure response:
want to another may be different process space of file descriptor is the same, but the file descriptor can only be used in the current process space,


Are initialized in the same thread that is the same, but sometimes is different, if different, no problem
  • Related