Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regarding key and qid #19

Open
kolinfluence opened this issue Nov 28, 2022 · 0 comments
Open

regarding key and qid #19

kolinfluence opened this issue Nov 28, 2022 · 0 comments

Comments

@kolinfluence
Copy link

is key or message queue id (qid) <== this going to be different if i ran the program for a long time (e.g. forever)
coz i would like to init once instead of going to get the msqid all the time.

will it change during the runtime of the program? otherwise i just init as a variable and use everywhere for the duration of the daemon program

	key, err := ipc.Ftok(ftokpath, ftokid)
	if err != nil {
		log.Fatal(err)
	}

	var qid uint

	switch os.Args[1] {
	case "s", "r":
		qid, err = ipc.Msgget(key, ipc.IPC_CREAT|perm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant