rick@taux01.UUCP (Rick Pelleg ) (03/16/89)
Hello ye wizards. Can anyone help me with the following problem? Is it possible to emulate the BSDs system-call ftruncate(fd, length) int fd; off_t length; on UNIX SYS-V, Using anything available (library + system calls)? No, I DON'T have the name of the file... only a file pointer which I can convert to a file-descriptor using 'fileno()'. And please do not answer 'fp = fdopen(fileno(fp), "w")', as this will return a NEW file pointer (i.e., a new _iob entry). The old file pointer info will remain and be flushed when files are closed (e.g., by exit()). I am not a regular reader of this group, so please mail answers directly to me. I will summarize the interesting ones for the net. Thanks in advance -- --- Rick Pelleg National Semiconductor (Israel) 6 Maskit st. P.O.B. 3007, Herzlia 46104, Israel Tel. (972)52-522264 rick%taux01@nsc.com @{hplabs,pyramid,sun,decwrl}