# CARDMGR -f

## rvdp

Sorry to be rude, please enlighten me.

When is -f gona be put back in /etc/conf.d/pcmcia??

Sooo many people I have helped by telling them this 'trick'

Also, even though having no -f completley braeks cardmgr, and it should be set, the latest .34 version has no problem with/without it.

1.3 at least. Pleeeease  :Smile: 

Patrick.

----------

## chadh

Well, originally we had it in b/c it caused problems with people who had both the pcmcia init script *and* the net.eth? scripts in their runlevel.  Since we changed the scheme to let cardmgr run the net.eth? init scripts, that problem should have gone away.  cardmgr works fine for me without the -f.  What exactly is the problem when that option is not there?

----------

## rvdp

A bug in cardmgr versions less than 3.1.34 exist. Acoording to sourceforge the problem is fixed in .34.

The bug is that /var/run/stab is deleted if cardmgr is not run with -f.

As I saw in bugzilla, -f was removed from gentoo, but a later coment by drobbins said it was put back. duno wat happened there.

Having no -f dosent 100% save the net.eth? in init problem, I was chating to some one who had no -f and net.eth? in init. It didnt work.

But no -f and no net.eth? in the init is fine...untill users want to eject etc.

Often they will not see the 'cant find stab file' error, and will wonder why net.eth0 is still up and all there netmounts are hung....

Now, the bug is fixed in .34, but -f should be used anyway, IMO.

Hope this helps

Patrick.

----------

## chadh

Okay pcmcia-cs-3.1.34 is in portage.  I also added the -f flag back.  The ebuilds are masked for now, but feel free to try them and let me know how they work.

----------

## rvdp

Hey chad, real sorry bout this.

The following "atexit" are additional to .33, thus an attempt to fix unlinking of the stab file.

They foo bared .34

        if (delay_fork) {

            atexit(NULL);

            fork_now();

            atexit(&done);

            write_pid();

atexit(NULL) seg faults!

.34 ChangeLog:

"Fixed bug with premature file cleanup in cardmgr when using "-f"

   (delayed fork) option."

Not quite..

Till next time.

Patrick.

----------

## chadh

Have you tried it, or did you just come up with that from an audit of the code?  I confirm all that, but I want to make sure that cardmgr actually crashes on exit.

----------

## rvdp

Yup, segfaults on exit.

cardmgr continues to run, it forks and the parent crashes.

Efectivley the only problem is that pcmcia fails to start, but besides that the pcmcia card is up and running.

----------

## chadh

Well, I submitted a bug report, and I threw together a patch that removes that atexit(NULL) call, but I don't know if that is the proper fix.

It is masked as pcmcia-cs-3.1.34-r2.ebuild

----------

## rvdp

On Tue, Jul 02, 2002 at 01:08:40AM -0700, Patrick wrote:

> 

> But ideally we would use techniques that all the

> other daemons use. _exit() for child process exit

> code or something, avoid atexit calls all together.

Thanks, this will be fixed (for real) in the next beta for 3.1.35.

-- Dave

(Dave Hinds)

Till then the patch is:

1225,1229d1224

< static void dummy(void)

< {

<

< }

<

1481c1476

<           atexit(&dummy);

---

>           atexit(NULL);

Ive tested this patch for reboot with -f. Works nicely.

Patrick.

----------

## chadh

I'll add that patch and release it as 3.1.34-r3 and 3.1.34-r4 (orinoco 0.12)

----------

