diff options
| author | Mike Pritchard <mpp@FreeBSD.org> | 1996-02-15 05:02:16 +0000 |
|---|---|---|
| committer | Mike Pritchard <mpp@FreeBSD.org> | 1996-02-15 05:02:16 +0000 |
| commit | d428a98d6d9a54e708ba4c898cd4d515b020ad8d (patch) | |
| tree | 926f15cb7b6c86984a232b49d679c0a1bd2cbb7f /lib | |
| parent | c8ead7a6cf043224d6a8ad1b179906fb6631e286 (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/stdio/mktemp.3 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3 index 361bebf685e0..a9d31462c22c 100644 --- a/lib/libc/stdio/mktemp.3 +++ b/lib/libc/stdio/mktemp.3 @@ -124,6 +124,28 @@ may also set to any value specified by the .Xr open 2 function. +.Sh NOTES +A common problem that results in a core dump is that the programmer +passes in a read-only string to +.Fn mktemp +or +.Fn mkstemp . +This is common with programs that were developed before +.St -ansiC +compilers were common.. +For example, calling +.Fn mkstemp +with an argument of +.Qq /tmp/tempfile.XXXXXX +will result in a core dump due to +.Fn mkstemp +attempting to modify the string constant that was given. +If the program in question makes heavy use of that type +of function call, you do have the option of compiling the program +so that it will store string constants in a writable segment of memory. +See +.Xr gcc 1 +for more information. .Sh SEE ALSO .Xr chmod 2 , .Xr getpid 2 , |
