dls-controls / ethercat

EPICS support to read/write to ethercat based hardware
23 stars 12 forks source link

File descriptor and socket cleanup #2

Closed asoderq closed 8 years ago

asoderq commented 8 years ago

This commit cleans up the file descriptor when the scanner application is terminated. This is done with remove [1] on the file descriptor.

However I am not sure if this is the proper way to do it. Instead I think you should close all sockets created by accept [2].

Possibly the same problem as this: http://stackoverflow.com/questions/12820976/close-on-socket-not-releasing-file-descriptor

[1] http://linux.die.net/man/3/remove [2] http://linux.die.net/man/2/accept