Skip to content

regarding key and qid #19

Description

@kolinfluence

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions