作者polaroid (pola)
看板LinuxDev
标题Re: [问题] USB hotplug
时间Wed Sep 3 13:18:12 2008
※ 引述《Xphenomenon (啦 )》之铭言:
: 请教一下,在 linux 下当有 USB device 装置插进来之,
: kernel 会去呼叫 /sbin/hotplug 下这只程式,原本 hotplug 这只
: 程式是 user space 的程式,但现在问题来了,由 kernel 去呼叫
: 他时,有一些函数就不能使用了,例如 printf(),不知道这是什麽
: 原因呢?是不是由 kernel 呼叫的上层应用程式会有一些什麽限制吗?
: 感谢回答 :)
基本上, /sbin/hotplug 是kernel 对user space call back的一种interface,
When hotplug event generate, Kernel will call "/sbin/hotplug"
that means printf() 的output terminal不会是你login的terminal,
如果想看到执行的message, 请print到file or 是你login的terminal/console.\
--
an amateur of photography,
enjoy recording the wonderful things which happening everyday,
like to try different way and angle to capture the scene,
love the nature lighting and scene.
don't like to use flash light.
that's me.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 16.130.24.8
1F:推 Xphenomenon:原来如此!谢谢 :> 09/06 19:22