Skip to content

Instantly share code, notes, and snippets.

@acrognale
Created March 29, 2014 20:05
Show Gist options
  • Save acrognale/9861912 to your computer and use it in GitHub Desktop.
Save acrognale/9861912 to your computer and use it in GitHub Desktop.
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