开发者

Nant: Process id of a service that is already running

开发者 https://www.devze.com 2022-12-16 04:42 出处:网络
Does anyone know how to get the PID of the process that a windows service is running in from Nant? I am having file locking problems. I issue a stop command to the service and then try and delete the

Does anyone know how to get the PID of the process that a windows service is running in from Nant?

I am having file locking problems. I issue a stop command to the service and then try and delete the Windows service's files. However these are quite often locked by the process that the Windows service is running in. I want 开发者_运维百科to find the PID so that I can wait for it to terminate before deleting.

Thanks


You might have to create a custom nant task to do this. However you might want to see about just adding maybe a delay like 1 min or something before you try to replace your files. Might be easier.

0

精彩评论

暂无评论...
验证码 换一张
取 消