Why does mkstemp() core dump on me? rewind()ing stdin...

Ray Spalding cc100aa at prism.gatech.EDU
Thu Nov 8 10:17:59 AEST 1990


In article <2626 at ux.acs.umn.edu> edh at ux.acs.umn.edu (Eric D. Hendrickson) writes:
[...]
>	char	*template = ".psoptfXXXXXX";
[...]
>/* THE FOLLOWING LINE CORE DUMPS */
>		if ((tmp = mkstemp(template)) < 0) {
[...]

String constants may not be writable.  Try:
	char	template[] = ".psoptfXXXXXX";
-- 
Ray Spalding, Technical Services, Office of Information Technology
Georgia Institute of Technology, Atlanta Georgia, 30332-0715
uucp:     ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!cc100aa
Internet: cc100aa at prism.gatech.edu



More information about the Comp.lang.c mailing list