Created
March 29, 2014 20:05
-
-
Save acrognale/9861912 to your computer and use it in GitHub Desktop.
This file contains 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
package main | |
import ( | |
"container/list" | |
"fmt" | |
"os" | |
) | |
type Job struct { | |
Name string | |
} | |
func main() { | |
var JobQueue list.List | |
job1 := Job{"/bin/sh"} | |
job2 := Job{"/bin/sh"} | |
JobQueue.PushBack(job1) | |
JobQueue.PushBack(job2) | |
for e := JobQueue.Front(); e != nil; e=e.Next() { | |
_, err := os.StartProcess(e.(Job).name, nil, nil) | |
fmt.Printf("%v", err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment