An error occurred while running the example in apue. Please take a look!
Source: Internet
Author: User
An error occurred while running the example in apue. Please take a look! -- Linux general technology-Linux technology and application information. For details, refer to the following section. When I run an example of utime function in Chapter 4 of apue, I always reported the text is busy error. Please take a look.
# Include "apue. h"
# Include
# Include
Int
Main (int argc, char * argv [])
{
Int I, fd;
Struct stat statbuf;
Struct utimbuf timebuf;
For (I = 1; I <argc; I ++ ){
If (stat (argv
, & Statbuf) <0) {/* fetch current times */ Err_ret ("% s: stat error", argv); Continue; } If (fd = open (argv, O_RDWR | O_TRUNC) <0) {/* truncate */ Err_ret ("% s: open error", argv); Continue;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.