0

I have a program that should generate a socket. Using strace I get the following trace line

bind(6, {sa_family=AF_UNIX, sun_path="/home/me/x"}, 110) = 0

However, "/home/me/x" does not exist and I see no call of unlink. May it happen, that no file is created even if the call is successful (=0) ?

Disclaimer: The program in question is https://github.com/nixcloud/ip2unix so it does some nasty stuff by replacing sockets. However, the bind call gives success and the program normally works, so am I missing sth. ? Shouldn't the file in all cases exist now?

till
  • 570
  • 1
  • 6
  • 22

1 Answers1

0

Actually, I think that is not possible. What I did not account for was that strace does not follow children, so after a helpful hint strace -f showed the unlink call. I guess inotifywait would have revealed too that the socket file was actually created before unlinked...

till
  • 570
  • 1
  • 6
  • 22