View Single Post
Old 10-17-2009, 10:34 AM   #10
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Antartica View Post
I though that you were doing the experiments using a ssh shell from another computer...
I put the QT/E demo program (including run.sh) in MMC card and executed it on iLiad.


Quote:
Originally Posted by Antartica View Post
To disable X from getting the events first, you have to send a SIGSTOP to the X server in the run.sh, and when you are done a SIGCONT.

ps -efa | grep Xfbdev | sed 's/ */ /g' | cut -d ' ' -f 2 | xargs kill -STOP
By my very limited knowledge of shell script, I think that "ps -efa | grep Xfbdev | sed 's/ */ /g' | cut -d ' ' -f 2 | " will get certain process list from "ps" command. Pipes are still unsolved mystery for me.

What does "xargs kill -STOP" do? Killing xserver process? I don't understand what does "xargs kill -STOP" do even after reading man.

To make things simpler, I sshed into iLiad and ran "ps". I got:
Code:
root@ereader:~# ps
  PID  Uid     VmSize Stat Command
    1 root        524 S   init [5]
    2 root            SW  [keventd]
    3 root            SWN [ksoftirqd_CPU0]
    4 root            SW  [kswapd]
    5 root            SW  [bdflush]
    6 root            SW  [kupdated]
    7 root            SW  [kUCB1x00d]
    8 root            SW  [khubd]
   15 root            SW  [tffs1]
  252 root        580 S   /sbin/cardmgr
  280 root        532 S   /usr/bin/displayMgr -p
  281 root        608 S   /usr/bin/erbusyd
  284 root        608 S   /usr/bin/erbusyd
  285 root       2260 S   /usr/bin/Xfbdev -screen 768x1024x8 -3button -dpi 160
  286 root        608 S   /usr/bin/erbusyd
  288 root       4048 S   /usr/bin/matchbox-window-manager -use_titlebar no -us
  289 root       6436 S   /usr/bin/pageBar
  292 root       3876 S   /usr/bin/matchbox-panel --size 39 --no-menu --bgcolor
  333 root            SW  [wlan_main_servi]
  334 root            SW  [wlan_reassoc_se]
  432 root       3568 S   mb-applet-icon-container
  441 root        592 S   /bin/sh /etc/rc5.d/S99start start
  442 root       2332 S   /usr/bin/powerMgr
  444 root      12256 S   /usr/bin/newLister --items 12 --sync
  453 root       2332 S   /usr/bin/powerMgr
  454 root       2332 S   /usr/bin/powerMgr
  486 root            SW  [mmcblockd]
  593 root      12256 S   /usr/bin/newLister --items 12 --sync
  598 root      12256 S   /usr/bin/newLister --items 12 --sync
  607 root            SW  [usbplugd]
  608 root        512 S   /sbin/getty -L ttyS2 115200 vt100
  609 root      12256 S   /usr/bin/newLister --items 12 --sync
  610 root      12256 S   /usr/bin/newLister --items 12 --sync
  611 root      12256 S   /usr/bin/newLister --items 12 --sync
  683 root        580 S   udhcpc -n -p /var/run/udhcpc.eth0.pid -t 4 -i eth0
  686 root        624 S   ./dropbear -d ./dropbear_dss_host_key -r ./dropbear_r
  689 root        448 S   msdisk /dev/tffsa6
  690 root       1148 S   ./dropbear -d ./dropbear_dss_host_key -r ./dropbear_r
  691 root        612 S   -sh
  856 root       1160 S   ./dropbear -d ./dropbear_dss_host_key -r ./dropbear_r
  857 root        768 S   -sh
  864 root        708 R   ps
Using the above output as example, I suppose that I should execute a "xargs kill 285 -STOP" (to send SIGSTOP to Xserver) in console before starting QT/E demo and execute a "xargs kill 285 -CONT" (to send SIGCONT) after QT/E demo quitted. Right? So, my run.sh will go as:
Code:
export scriptdir=`/usr/bin/dirname $0`
export QTDIR=/usr/local/Trolltech/QtEmbedded-4.5.3-arm
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export HOME=$scriptdir
cd $scriptdir
kill 285 -STOP
./application -qws
kill 285 -CONT

Last edited by ericshliao; 10-17-2009 at 10:53 AM.
ericshliao is offline   Reply With Quote