From patchwork Mon Jul 9 13:00:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Thomas X-Patchwork-Id: 1172911 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1598440B31 for ; Mon, 9 Jul 2012 13:08:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753229Ab2GINAU (ORCPT ); Mon, 9 Jul 2012 09:00:20 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37494 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753155Ab2GINAU (ORCPT ); Mon, 9 Jul 2012 09:00:20 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 9B75AA24CA for ; Mon, 9 Jul 2012 15:00:18 +0200 (CEST) Date: Mon, 9 Jul 2012 15:00:18 +0200 From: Philipp Thomas To: linux-rdma@vger.kernel.org Subject: Behaviour when specifying '-g 0 -B' Message-ID: <20120709130018.GD15468@paradies.suse.de> MIME-Version: 1.0 Content-Disposition: inline X-Operating-System: openSUSE - Kernel Linux 3.4.2-1-desktop x86_64 Organization: SUSE LINUX Products GmbH, =?iso-8859-1?Q?G?= =?iso-8859-1?Q?F=3A_Jeff_Hawn=2C_Jennifer_Guild=2C_Felix_Imend=F6rffer=2C?= =?iso-8859-1?Q?_HRB_21284_=28AG_N=FCrnberg=29?= User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Currently opensm will silently fail if you pass '-g0 -B'. As you can't ask for a port, how about exiting with failure in daemonize. That way the user would see the reason for opensm's failure. --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: main.c =================================================================== --- main.c.orig 2010-09-04 12:04:59.000000000 +0200 +++ main.c 2012-07-09 13:42:56.757934702 +0200 @@ -464,6 +464,11 @@ static int daemonize(osm_opensm_t * osm) pid_t pid; int fd; + if ( INVALID_GUID == opt.gui ) { + fputs(stderr, "opensm: Invalid GUID specified: exiting because of daemon mode"); + return -1; + } + fd = open("/dev/null", O_WRONLY); if (fd < 0) { perror("open");