public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Don Breazeal <donb@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb.base/info-os.c: clean up SysV IPC on error
Date: Sat, 31 Jan 2015 22:22:00 -0000	[thread overview]
Message-ID: <alpine.LFD.2.11.1501310504150.28301@eddie.linux-mips.org> (raw)
In-Reply-To: <1422637464-20419-1-git-send-email-donb@codesourcery.com>

Don,

> We have noticed here that over time some of our test systems accumulate
> stale System V IPC resources.  At least some of this is due to a GDB test
> program, gdb.base/info-os.c.  The program doesn't clean up any allocated
> IPC objects when an error occurs.  System V IPC objects will stay around
> forever unless they are explicitly removed (or until a reboot).
> 
> This patch puts the IPC cleanup code into a function and calls the
> function everywhere that a fatal error can occur, as well as at 
> successful termination.

 Use `atexit' to run `ipc_cleanup' automagically instead maybe?  This way 
you won't have to run the function manually at each exit point and also it 
won't be missed on any future updates.

 Just a thought if you want to experiment with it, there's nothing really 
wrong with your proposal as it stands.

  Maciej

  reply	other threads:[~2015-01-31 11:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 20:16 Don Breazeal
2015-01-31 22:22 ` Maciej W. Rozycki [this message]
2015-02-02 22:37   ` [PATCH v2] gdb.base/info-os.c: Clean " Don Breazeal
2015-02-03 15:32     ` Pedro Alves
2015-02-04 21:33       ` [commit] " Breazeal, Don

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.11.1501310504150.28301@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=donb@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).