Howdy, Im involved in some crossplatform work, and ran into the following pair of issues.
1. Apparently, default behavour in Go, is to set F_CLOEXEC, aka "Close on Exec", on file descriptors. And there is a public syscall, in the exec_unix.go source, func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) } and hey, thats great.. it uses the POSIX standard call fcntl to do it. So.. why isnt there any matching "DontCloseOnExec" function? A go package I want to use, actually depends on it being unset. But it unsets it in a non-portable way. Which brings me to.. 2. Why isnt there a public Fcntl function?? (Please add?) You find a few halfway hacks already public. For example, someone added syscall.FcntlFlock() but why not just add a public Fcntl call to start with? People are doing things non-portably, with things such as unix.Syscall(unix.SYS_FCNTL, lockFD, unix.F_SETFD, 0); it seems like practically every single system under the syscall directory in the go1.10 source has its own separate, redundant, PRIVATE "func fcntl" And its part of the POSIX standard. so.. Why not add a standard sys.unix.Fcntl() ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.