benibela / xidel

Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
http://www.videlibri.de/xidel.html
GNU General Public License v3.0
681 stars 42 forks source link

[Bug] r6467 and newer hangs when calling another instance through system() #76

Closed Reino17 closed 3 years ago

Reino17 commented 3 years ago
$ echo $PWD
[...]/xidel/source/videlibri-code_hg

https://sourceforge.net/p/videlibri/code/ci/93e9ba097affe525e1b22b81f951c867ee0df207/

$ ./programs/internet/xidel/xidel --version
Xidel 0.9.9
(20210529.6466.93e9ba097aff)

http://www.videlibri.de/xidel.html
by Benito van der Zander <benito@benibela.de>

$ ./programs/internet/xidel/xidel -se '
  for $x in 1 to 3 return
  x:lines(system(x"./programs/internet/xidel/xidel -se '\''{$x} * {$x}'\''"))[1]
'
1
4
9

https://sourceforge.net/p/videlibri/code/ci/376c9b05489d71c66bcc8582cd438340eebd0eb6/

$ ./programs/internet/xidel/xidel --version
Xidel 0.9.9
(20210529.6467.376c9b05489d)

http://www.videlibri.de/xidel.html
by Benito van der Zander <benito@benibela.de>

$ ./programs/internet/xidel/xidel -se '
  for $x in 1 to 3 return
  x:lines(system(x"./programs/internet/xidel/xidel -se '\''{$x} * {$x}'\''"))[1]
'

Nothing happens and you'd have to kill the process.