[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#850220: ITP: node-get-port -- Get an available port



On Thu, 2017-01-05 at 12:23 +0530, Nupur Malpani wrote:
> Package: wnpp
> Severity: wishlist
> Owner: Nupur Malpani <malpaninupur325@gmail.com>
> X-Debbugs-CC: debian-devel@lists.debian.org
> 
> * Package name    : node-get-port
>   Version         : 2.1.0
>   Upstream Author : Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com
> )
> * URL             : https://github.com/sindresorhus/get-port
> * License         : Expat
>   Programming Lang: JavaScript
>   Description     : Get an available port

Isn't this inherently racy?  It looks like it creates a listening
socket, closes it, then returns the port that was used.  But the port
could immediately be allocated by another process, before the caller
tries to use it.

If I understood correctly, this should not be packaged and whatever
depends on it should be fixed to avoid the race condition.

Ben.

-- 
Ben Hutchings
In a hierarchy, every employee tends to rise to his level of
incompetence.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: