Opened 8 years ago

Last modified 6 years ago

#658 new defect

IZ2984: ensure proper call of SGE_EXIT

Reported by: joga Owned by:
Priority: high Milestone:
Component: sge Version: 6.1
Severity: Keywords: Sun cleanup
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=2984]

        Issue #:      2984             Platform:     Sun      Reporter: joga (joga)
       Component:     gridengine          OS:        All
     Subcomponent:    cleanup          Version:      6.1         CC:    None defined
        Status:       NEW              Priority:     P2
      Resolution:                     Issue type:    DEFECT
                                   Target milestone: ---
      Assigned to:    ernst (ernst)
      QA Contact:     ernst
          URL:
       * Summary:     ensure proper call of SGE_EXIT
   Status whiteboard:
      Attachments:

     Issue 2984 blocks:
   Votes for issue 2984:


   Opened: Wed Apr 8 05:00:00 -0700 2009 
------------------------


When the gdi2 interface was introduced in 6.1, passing the gdi context to all functions actually needing it has not been completed.
Especially for calls to SGE_EXIT this causes a (minor) problem:
When SGE_EXIT is called without passing the gdi context,
it cannot execute the default exit function.
This default exit function does release resources, for example it shuts down a possibly open commlib connnection.
Exiting without closing a commlib connection generates logging in the qmaster messages file, which might be confusing or misleading.

Currently the following files still contain calls to SGE_EXIT(NULL, <exit_code), some 60 calls in total:
clients/qdel//qdel.c
clients/qhost//qhost.c
clients/qquota//qquota.c
clients/qrdel//qrdel.c
clients/qsh//qsh.c
daemons/execd//execd.c
daemons/execd//setup_execd.c
daemons/qmaster//setup_qmaster.c
daemons/qmaster//sge_qmaster_threads.c
libs/gdi//sge_gdi_ctx.c
libs/sgeobj//sge_answer.c
libs/spool//test_spooling_mt.c
libs/spool/flatfile//test_flatfile_spool.c
libs/uti//setup_path.c
libs/uti//sge_arch.c
libs/uti//sge_edit.c
libs/uti//sge_hostname.c
libs/uti//sge_os.c
libs/uti//sge_stdio.c
libs/uti//sge_unistd.c

Calling SGE_EXIT in libraries can in general be considered bad style - a library call should *never* simply exit the process.

Change History (0)

Note: See TracTickets for help on using tickets.