Thread: createuser - allow user cancel or kill to work

createuser - allow user cancel or kill to work

From
Oliver Elphick
Date:
At present it is impossible to kill createuser except with kill -9

Index: src/bin/scripts/createuser
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/scripts/createuser,v
retrieving revision 1.30
diff -u -r1.30 createuser
--- src/bin/scripts/createuser  2003/02/13 05:37:44     1.30
+++ src/bin/scripts/createuser  2003/02/13 11:40:32
@@ -179,7 +179,7 @@
 # Don't want to leave the user blind if he breaks
 # during password entry.

-trap 'stty echo >/dev/null 2>&1' 1 2 3 15
+trap 'stty echo >/dev/null 2>&1; echo; exit 1' 1 2 3 15

 # Get missing user attributes


--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "The earth is the LORD'S, and the fullness thereof; the
      world, and they that dwell therein."
                                   Psalms 24:1


Re: createuser - allow user cancel or kill to work

From
Bruce Momjian
Date:
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Oliver Elphick wrote:
> At present it is impossible to kill createuser except with kill -9
>
> Index: src/bin/scripts/createuser
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/scripts/createuser,v
> retrieving revision 1.30
> diff -u -r1.30 createuser
> --- src/bin/scripts/createuser  2003/02/13 05:37:44     1.30
> +++ src/bin/scripts/createuser  2003/02/13 11:40:32
> @@ -179,7 +179,7 @@
>  # Don't want to leave the user blind if he breaks
>  # during password entry.
>
> -trap 'stty echo >/dev/null 2>&1' 1 2 3 15
> +trap 'stty echo >/dev/null 2>&1; echo; exit 1' 1 2 3 15
>
>  # Get missing user attributes
>
>
> --
> Oliver Elphick                                Oliver.Elphick@lfix.co.uk
> Isle of Wight, UK                             http://www.lfix.co.uk/oliver
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
>                  ========================================
>      "The earth is the LORD'S, and the fullness thereof; the
>       world, and they that dwell therein."
>                                    Psalms 24:1
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: createuser - allow user cancel or kill to work

From
Bruce Momjian
Date:
Patch applied.  Thanks.

---------------------------------------------------------------------------


Oliver Elphick wrote:
> At present it is impossible to kill createuser except with kill -9
>
> Index: src/bin/scripts/createuser
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/scripts/createuser,v
> retrieving revision 1.30
> diff -u -r1.30 createuser
> --- src/bin/scripts/createuser  2003/02/13 05:37:44     1.30
> +++ src/bin/scripts/createuser  2003/02/13 11:40:32
> @@ -179,7 +179,7 @@
>  # Don't want to leave the user blind if he breaks
>  # during password entry.
>
> -trap 'stty echo >/dev/null 2>&1' 1 2 3 15
> +trap 'stty echo >/dev/null 2>&1; echo; exit 1' 1 2 3 15
>
>  # Get missing user attributes
>
>
> --
> Oliver Elphick                                Oliver.Elphick@lfix.co.uk
> Isle of Wight, UK                             http://www.lfix.co.uk/oliver
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
>                  ========================================
>      "The earth is the LORD'S, and the fullness thereof; the
>       world, and they that dwell therein."
>                                    Psalms 24:1
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073