Re: synchronous freebsd print



This is a standard C question.

Sorry, if this clarification is too simple, but I
thought freeBSD kernel implemented its own
print function. and the man for fflush says it is
in the standard C-library.
and the kernel source has no defn for fflush.

I saw lots of kernel related questions asked
in this list, so I posted my question here. Please
correct me if I am wrong.

and Yes in the kernel code I have a "\n" at the end
of my print, still the print is not complete and
the line next to it that causes the crash does
not give the result I want. Is this a common
scenario or am I doing something wrong.

Sanjeev.

Peter Jeremy <peterjeremy@xxxxxxxxxxxxxxxx> wrote: On Wed, Feb 27, 2008 at 12:08:28AM -0800, Sanjeev Kumar.S wrote:
I have a quick question, and I believe this will
be a common requirement.

This is a standard C question.

I do a print of some data and then immediately
in a next statement there is a crash.
...
Is there anyway to get the complete print
before executing the next instruction.

Look at fflush(3)

--
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.



---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • [BUG]: Crash with CONFIG_FAIR_CGROUP_SCHED=y
    ... If we skip the 'mount' command, there is no crash. ... mounting just the cpu or just the ns subsystem does not ... Kernel 2.6.24-rc1 on an x86_64 ...
    (Linux-Kernel)
  • Re: OT: The whole Apple can Run Windows thing...
    ... ECC errors TODAY ... you can tell the kernel to ignore it or to commit suicide. ... It is far better to take the hard crash, ... A "poorly written program" can crash the kernel you say? ...
    (rec.photo.digital.slr-systems)
  • Re: What protection does sysfs_readdir have with SMP/Preemption?
    ... Assumption here is that if there is a dentry attached to ... so it appears that the -rt kernel is triggering some genuine sysfs race. ... Also, that particular crash happens ... target0:0:0: Beginning Domain Validation ...
    (Linux-Kernel)
  • Re: Help to evaluate the system crash resistance method
    ... Neither of these is a small task such as tweaking an IDT ... > Windows 2k/XP/2k3 Filesystem and Driver Consulting ... >> I just thought a approach to hold system crash caused by those tiny SW ... >> for a while, then kernel will re-schedule to other threads.In this case, ...
    (microsoft.public.development.device.drivers)
  • Re: Help to evaluate the system crash resistance method
    ... Neither of these is a small task such as tweaking an IDT ... > Windows 2k/XP/2k3 Filesystem and Driver Consulting ... >> I just thought a approach to hold system crash caused by those tiny SW ... >> while, then kernel will re-schedule to other threads.In this case, system ...
    (microsoft.public.windowsxp.device_driver.dev)