Re: problem with syscall macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i am writing a program which willcopy all the lines from system log file /var/log/messages and put it in a user log file
i am using syslog with syscall3 but when i am using write system cal it is not able to write anything

fd = open(/var/log/messages) fd1 = open(myfile)

read(fd, buffer,count)
write(fd, buffer, count)

Why do you need syslog, syscall3 etc. ?

--Swapnil

"Theory is when you know something, but it doesn't work.Practice is when something works, but you don't know why.Programmers combine theory and practice: Nothing works and they don't know why ..."

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux