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

Add support for TMPDIR variable (fixes #1) #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christopheredsall
Copy link

Currently the output files are hardcoded to be under /tmp. This PR adds support for the user specifying an alternative prefix via the TMPDIR environment variable.

An internal code review suggeseted allocating the space for the filename on the heap rather than the stack. (Now that the prefix can be user supplied it could be up to PATH_MAX == 4096 bytes)

There is a possibility that the process ID could be longer than five characters. On the system I have access to this isn't the case

$ cat /proc/sys/kernel/pid_max
57344

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

Successfully merging this pull request may close these issues.

1 participant