Re: Make psql's qeury canceling test simple by using signal() routine of IPC::Run - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: Make psql's qeury canceling test simple by using signal() routine of IPC::Run
Date
Msg-id 92e71ed9-a970-3370-2abd-5c588ccd3786@mines-paristech.fr
Whole thread Raw
In response to Make psql's qeury canceling test simple by using signal() routine of IPC::Run  (Yugo NAGATA <nagata@sraoss.co.jp>)
Responses Re: Make psql's qeury canceling test simple by using signal() routine of IPC::Run
List pgsql-hackers
Hello Yugo-san,

> Currently, the psql's test of query cancelling (src/bin/psql/t/020_cancel.pl)
> gets the PPID of a running psql by using "\!" meta command, and sends SIGINT to
> the process by using "kill". However, IPC::Run provides signal() routine that
> sends a signal to a running process, so I think we can rewrite the test using
> this routine to more simple fashion as attached patch.
>
> What do you think about it?

I'm the one who pointed out signal(), so I'm a little biaised, 
nevertheless, regarding the patch:

Patch applies with "patch".

Test code is definitely much simpler.

Test run is ok on my Ubuntu laptop.

Let's drop 25 lines of perl!

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Ignore 2PC transaction GIDs in query jumbling
Next
From: Fabien COELHO
Date:
Subject: Re: pgbench: allow to exit immediately when any client is aborted