ipc icon indicating copy to clipboard operation
ipc copied to clipboard

regarding key and qid

Open kolinfluence opened this issue 2 years ago • 0 comments

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)

kolinfluence avatar Nov 28 '22 12:11 kolinfluence