Skip to content

Working around really really a small but irritating nwam bug

November 29, 2008

The euphoria over having a laptop that would suspend to RAM did not last long before it was shattered by a more real world situation. That is suspending while the wireless is connected, ie not when at my desk. This is bug 6766807 which is somewhat irritating and I’m sure will be resolved soon. With my work hat on I wonder if this could be one of the bugs that will be fixed in a supported update. However there is a simple work around.

#!/bin/ksh  function restart_nwam { 	pfexec svcadm restart nwam } trap restart_nwam 35  while : do 	sleep $((60*60*24)) done 

Run that script as one of the programs started by the session and this problem is history. Obviously keep an eye on the bug so that when the fix is delivered you remove the work around. I’ll update the bug with the workaround on Monday.

Advertisements

From → Solaris

4 Comments
  1. Roland Mainz permalink

    What about adding a "trap" which waits for the SIGTHAW/SIGFREEZE signals (which should be send to all processes when the OS is suspended/de-suspended ; I’m not sure whether ksh88 supports traps for these signals but ksh93 definately supports the signals) ?

  2. Randy permalink

    Trapping on SIGFREEZE doesn’t help, as there is no guarantee that the signal will be delivered till after resume. So the only relevant signal is SIGTHAW. But if the problem is specifically on resume, trapping on SIGTHAW should work.

  3. @rowland
    the script does trap on THAW but by number since there is abug where ksh93 does not understand THAW. See bug http://bugs.opensolaris.org/view_bug.do?bug_id=6778077

  4. Roland Mainz permalink

    > the script does trap on THAW but by number since
    > there is abug where ksh93 does not understand
    > THAW. See bug #6778077
    Grumpf… the ksh93-integration update2 will fix the problem… and we won’t see this bugs again since I added a test module to ksh93’s test suite to check whether the bug is fixed or not – see http://svn.genunix.org/repos/on/branches/ksh93/gisburn/scripts/tests/sun_solaris_cr_6778077_sigthaw_trap.sh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: