]> git.meshlink.io Git - meshlink/commit
Use PATHEXT when checking for the presence of scripts on Windows.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 23 Aug 2013 17:24:36 +0000 (19:24 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 23 Aug 2013 19:23:46 +0000 (21:23 +0200)
commit57991e264202ad83e2c1b663777b358bf5573652
treee7e449fe94b4aaac460573f951e86be90eab9ac0
parent21184674b38ea1da87588de97dab076c9b9e4a81
Use PATHEXT when checking for the presence of scripts on Windows.

It seems like a lot of overhead to call access() for every possible extension
defined in PATHEXT, but apparently this is what Windows does itself too. At
least this avoids calling system() when the script one is looking for does not
exist at all.

Since the tinc utility also needs to call scripts, execute_script() is now
split off into its own source file.
13 files changed:
src/Makefile.am
src/graph.c
src/invitation.c
src/net.c
src/net_packet.c
src/net_setup.c
src/process.c
src/process.h
src/protocol_auth.c
src/script.c [new file with mode: 0644]
src/script.h [new file with mode: 0644]
src/subnet.c
src/tincctl.c