Created
January 6, 2015 16:34
-
-
Save ailabs-software/220b92f9035e49ac0bef to your computer and use it in GitHub Desktop.
Trying to create a listener I can pass to the worker.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func startWorker() { | |
| cmd := exec.Command("myworker"); | |
| f, err := os.Create("/tmp/worker7.sock"); | |
| if (err != nil) { panic(err); } | |
| _, file_err := net.FileListener(f); // ERROR: getsockopt: socket operation on non-socket | |
| if (file_err != nil) { panic(file_err); } | |
| cmd.ExtraFiles = []*os.File{ f }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment